// basic fragment shader

uniform vec4 u_fgColor;

varying float v_inside;

void main()
{
    bool inside;
    bool triInside;
    vec2 uv = gl_TexCoord[0].st;
    vec4 fgColor = vec4(0.0, 0.0, 0.0, 0.0);
    
    inside = (uv[0]*uv[0] - uv[1]) > 0.0;
    triInside = (v_inside > 0.0);
    
    if (triInside == inside)
    {
       fgColor = u_fgColor;
    }
    
    gl_FragColor = fgColor;
}
